import http from './http';
// http://localhost:7001/login
export const loginApi = (userName, passWord) => {
    return http({
        url: '/login',
        method: 'POST',
        data: {
            userName, passWord
        }
    });
}
// http://localhost:7001/getUserInfo
export const getUserInfoApi = () => {
    return http({
        url: '/getUserInfo',
        method: 'GET',
    });
}
// http://localhost:7001/getUserList
export const getUserListApi = () => {
    return http({
        url: '/getUserList',
        method: 'GET',
    });
}
// http://localhost:7001/delUser
export const delUserApi = (id) => {
    return http({
        url: '/delUser',
        method: 'DELETE',
        params:{id},
    });
}
// http://localhost:7001/userSearch
export const userSearchApi = (title) => {
    return http({
        url: '/userSearch',
        method: 'GET',
        params:{title},
    });
}
// http://localhost:7001/addUser
export const addUserApi = (data) => {
    return http({
        url: '/addUser',
        method: 'POST',
        data: {
           ...data
        }
    });
}
// http://localhost:7001/editItem
export const editItemApi = (data) => {
    return http({
        url: '/editItem',
        method: 'PUT',
        data: {
           ...data
        }
    });
}